import React, { useState } from 'react';
import logo from './logo.svg';
import './App.css';
import { Page1 } from './views/Page1';
import { Tabs } from 'antd';
import 'antd/dist/antd.css';
import { Page2 } from './views/Page2';
import { Page3 } from './views/Page3';
import { Page4 } from './views/Page4';
import { Home } from './views/Home';

export interface RowData{
  id: number;
  username: string;
  password: string;
}

function App() {
  const [currentRow, setCurrentRow] =useState<RowData>();
  return (

    <div className="App" style={{padding: '40px'}}>
      <Tabs>
         <Tabs.TabPane tab='首页' key='home'>
            <Home></Home>
         </Tabs.TabPane>
         <Tabs.TabPane tab='不带参数自动加载数据' key='2'>
          <Page1 ></Page1>
         </Tabs.TabPane>
         <Tabs.TabPane tab='带参数自动加载数据' key='3'>
           <Page2 ></Page2>
         </Tabs.TabPane>
         <Tabs.TabPane tab='点击按钮获取数据' key='4'>
            <Page3></Page3>
         </Tabs.TabPane>
         <Tabs.TabPane tab='添加数据' key='5'>
           <Page4></Page4>
         </Tabs.TabPane>
      </Tabs>
    </div>
  );
}

export default App;
